//
//  CJCardSwitchFlowLayout.h
//  TSImageFilterDemo
//
//  Created by ciyouzen on 2017/2/25.
//  Copyright © 2017年 dvlproad. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CJCardSwitchFlowLayout : UICollectionViewFlowLayout {
    
}
// 以下两个值 CJCardSwitchLayoutInitTypeScale 的时候才有效
@property (nonatomic, assign, readonly) CGFloat cardWidthScale;     /**< 居中时候，卡片宽度占据cell宽度的比例 */
@property (nonatomic, assign, readonly) CGFloat cardHeightScale;    /**< 居中时候，卡片高度占据cell高度的比例 */

// 以下四个值 CJCardSwitchLayoutInitTypeMargin 的时候才有效
@property (nonatomic, assign, readonly) CGFloat cardMaginLeft;          /**< 居中时候，卡片左边缘距离collectionView左侧的距离 */
@property (nonatomic, assign, readonly) CGFloat cardMarginRight;        /**< 居中时候，卡片右边缘距离collectionView右侧的距离 */
@property (nonatomic, assign, readonly) CGFloat cardMarginTop;          /**< 居中时候，卡片上边缘距离collectionView上侧的距离 */
@property (nonatomic, assign, readonly) CGFloat cardMarginBottom;       /**< 居中时候，卡片下边缘距离collectionView下侧的距离 */


@property (nonatomic, copy) void(^progressValueChangeBlock)(NSIndexPath *indexPath, CGFloat progress, BOOL isLeftOrCenter);


/*
 *  初始化
 *
 *  @param cardWidthScale   居中时候，卡片宽度占据collectionView视图宽度的比例
 *  @param cardHeightScale  居中时候，卡片高度占据collectionView视图高度的比例
 *
 *  @return 布局layout
 */
- (instancetype)initWithCardWidthScale:(CGFloat)cardWidthScale cardHeightScale:(CGFloat)cardHeightScale NS_DESIGNATED_INITIALIZER;
/*
 *  初始化
 *
 *  @param cardMaginLeft            居中时候，卡片左边缘距离collectionView左侧的距离
 *  @param cardMarginRight          居中时候，卡片右边缘距离collectionView右侧的距离
 *  @param cardMarginTop            居中时候，卡片上边缘距离collectionView上侧的距离
 *  @param cardMarginBottom         居中时候，卡片下边缘距离collectionView下侧的距离
 *
 *  @return 布局layout
 */
- (instancetype)initWithCardMarginLeft:(CGFloat)cardMaginLeft
                       cardMarginRight:(CGFloat)cardMarginRight
                         cardMarginTop:(CGFloat)cardMarginTop
                      cardMarginBottom:(CGFloat)cardMarginBottom NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;

@end
